<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>配置项radar-雷达坐标系</title>
  <script src="./echarts.js"></script>
  <style lang="css">
    #chart1, #chart2 {
      width: 100%;
      height: 600px;
      border: 1px solid red;
      float: left;
    }
  </style>
</head>
<body>
  <div id="chart1"></div>
  <div id="chart2"></div>

  <script>
    const myChart1 = echarts.init(document.getElementById('chart1'));

    myChart1.setOption({
      title: {
        text: '雷达坐标系',
      },
      radar: {
        indicator: [
          { name: '得分', max: 150, min: 10, color: 'red' },
          { name: '篮板', },
          { name: '助攻', },
          { name: '抢断', },
          { name: '盖帽', },
          { name: '投篮', },
          { name: '三分', },
        ],
        center: ['50%', '50%'],
        radius: '60%',
        name: {
          show: true,
          formatter: '{value}',
          formatter: function (value, indicator) {
            return value + '数'
          }
        },
        splitNumber: 5,
        splitArea: {
          areaStyle: {
            color: ['rgba(255, 144, 128, 0.2)', 'rgba(255, 144, 128, 0.4)', 'rgba(255, 144, 128, 0.6)', 'rgba(255, 144, 128, 0.8)', 'rgba(255, 144,128, 1)'],
          }
        },
        shape: 'circle',
        nameGap: 20,
        axisLine: {
          show: true,
          lineStyle: {
            color: 'green',
            width: 1,
            type: 'solid'
          }
        },
        splitLine: {
          show: true,
          lineStyle: {
            color: 'blue',
            width: 1,
            type: 'solid'
          }
        }
      },
      tooltip: {
        trigger: 'item',
        formatter: function (params) {
          return params.name + ' : ' + params.value
        }
      },
      series: {
        name: '系列名称',
        type: 'radar',
        data: [
          { name: '火箭队', value: [ 109, 38, 29, 6, 2, 60, 17 ] },
          { name: '勇士队', value: [ 80, 20, 21, 10, 7, 61, 18 ] },
        ],
      }
    })
  </script>
</body>
</html>